<!--
 * @FileDescription GPS定位
 * @Author 杨宇翔
 * @Date 20220706 20:24:03
 * @LastEditors 杨宇翔
 * @LastEditTime 20220706 20:24:03
-->
<template>
    <div class="gps" v-show="UsageComponent.Default.ShowGPSLocation.value">
        <div class="container">
            <div class="header">
                <span>卫星定位</span>
                <span class="material-icons" @click="UsageComponent.Default.ShowGPSLocation.value = false">cancel</span>
            </div>
            <iframe ref="iframe" src="https://lbsyun.baidu.com/jsdemo/demo/yLngLatLocation.htm"></iframe>
        </div>
    </div>
</template>

<script setup lang="ts">
import { UsageComponent } from './InertialNavigationComponent';
</script>

<style scoped>
.gps {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;

    backdrop-filter: blur(1rem);
}

iframe {
    flex-grow: 1;

    width: 124rem;
    border-radius: 1rem;

    margin-bottom: 4rem;
}

.container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    width: 132rem;
    height: 84rem;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    gap: 2rem;

    border-radius: 2rem;
    border: solid 0.6rem transparent;
    background-image: linear-gradient(#131620, #131620),
        linear-gradient(90deg, #218cde, #807de1);
    background-origin: border-box;
    background-clip: content-box, border-box;
}

.header {
    width: 100%;

    padding: 2rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header>span:first-of-type {
    color: white;
    font-size: 2.4rem;
    font-weight: 500;
}

.header>.material-icons {
    color: #81859C;
    font-size: 3.6rem;
}

.search {
    width: 100%;

    padding-left: 4rem;

    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
}

.search>span {
    color: #81859C;
    font-size: 1.8rem;

    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.search>input {
    margin: 0;
    padding: 1.5rem;

    width: 20rem;
    height: 3.6rem;
    color: #B1B1D4;
    font-size: 1.8rem;
    line-height: 3.6rem;
    text-align: center;

    border: solid 0.1rem #36384B;
}

.search>input:focus {
    border: solid 0.1rem;
    border-image: linear-gradient(90deg, rgba(128, 125, 225, 1), rgba(33, 140, 222, 1)) 1 1;
}

.search>button {
    width: 10rem;
    height: 4rem;

    border-radius: 0.6rem;
    background: linear-gradient(180deg, #807DE1 0%, #218CDE 100%);
}

.search>button>span {
    color: white;
    font-size: 1.8rem;
}
</style>